package com.example.client;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Message {
    @JsonCreator
    public Message(@JsonProperty("sender") String sender,
                   @JsonProperty("receiver") String receiver,
                   @JsonProperty("group_id") String group_id,
                   @JsonProperty("type") String type,
                   @JsonProperty("message") String message) {
        this.sender = sender;
        this.receiver = receiver;
        this.group_id = group_id;
        this.type = type;
        this.message = message;
    }
    private String sender;
    private String receiver;
    private String group_id;
    private String type;
    private String message;

    @Override
    public String toString() {
        return "{" +
                "\"sender\":" + "\"" + sender + "\"" +  "," +
                "\"receiver\":" + "\"" + receiver + "\"" +  "," +
                "\"group_id\":" + "\"" + group_id + "\"" +  "," +
                "\"type\":" + "\"" + type + "\"" +  "," +
                "\"message\":" + "\"" + message + "\"" +
                '}';
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getGroup_id() {
        return group_id;
    }

    public void setGroup_id(String group_id) {
        this.group_id = group_id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
